<template>
	<view class="itemBox bg_Color99">
		<view class="imgInfo" @click="qrCode(info)">
			<image :src="info.activityBackground"></image>
			<view class="info">
				<view class="title">{{info.activityName}}</view>
				<view class="indexTitle"></view>
				<view class="conter">{{info.activityAddress}}</view>
				<view class="time">{{info.beginTime}} ~ {{info.endTime}}</view>
				<!-- <view class="time">{{info.beginTime.split(' ')[1]}} ~ {{info.endTime.split(' ')[1]}}</view> -->
			</view>
		</view>
		<!-- <view v-if="info.status" class="hand">
			<view :class="info.status=== '0'? 'zero':'one'">{{info.status=== '0'?'未处理':'已处理'}}</view>
			<view class="btn">{{info.status=== '0'?'立即处理':'查看详情'}}</view>
		</view>
 -->
	</view>
</template>

<script>
	export default {
		name: 'name',
		props: {
			info: {
				type: Object,
				default () {
					return {

					}
				}
			}
		},
		methods:{
			qrCode(item){
				this.$emit('qrCode',item);
			}
		}
	}
</script>

<style scoped lang="scss">
	.itemBox {
		display: flex;
		// height: 64px;
		justify-content: space-between;

		padding: 10px;
		border-radius: 5px;
		font-size: 12px;
		font-family: Source Han Sans CN-Regular, Source Han Sans CN;
		margin-bottom: 10px;
		position: relative;


		&.bg_Color2::after {
			border-radius: 5px;
			content: "";
			opacity: 0.1;
			position: absolute;
			left: 0;
			top: 0;
			right: 0;
			bottom: 0;
			z-index: -1;
			background: linear-gradient(90deg, #0065D8 0%, rgba(36, 138, 255, 0) 100%);

		}

		&.bg_Color99::after {
			border-radius: 5px;
			content: "";
			opacity: 1;
			position: absolute;
			left: 0;
			top: 0;
			right: 0;
			bottom: 0;
			z-index: -1;
			background: #fff;
		}

		.hand {
			display: flex;
			flex-direction: column;
			justify-content: space-around;
			align-items: end;

			.zero {
				color: #FF5B5B;
				margin-top: -10px;
				text-align: end;
			}

			.one {
				color: #3FD098;
				margin-top: -10px;
			}

			.btn {
				color: #0065D8;
				border: 1px solid #0065D8;
				border-radius: 20px;
				padding: 3px 11px;
				font-size: 14px;
				margin-bottom: -10px;
			}
		}

		.imgInfo {
			display: flex;
			width: 100%;

			.info {
				flex: 1;
				color: #333;
				display: flex;
				flex-direction: column;
				justify-content: space-around;
				position: relative;
				width: 200px;

				.indexTitle {
					width: 26px;
					height: 6px;
					background-color: #0065D8;
					opacity: 0.5;
					border-radius: 6px;
					margin-top: -7px;
					    position: absolute;
					    top: 20px;
				}

				.title {
					color: #000;
					font-size: 15px;
					font-weight: bold;
					position: absolute;
					top: -4px;
					left: 1px;
					 white-space: nowrap; 
					 overflow: hidden;
					 text-overflow: ellipsis;
					width:100%;
					
				}

				.conter {
					position: absolute;
					top: 26px;
					line-height: 18px;
					font-size: 14px;
					overflow: hidden;
					  text-overflow: ellipsis;
					  /* 将对象作为弹性伸缩盒子模型显示 */
					  display: -webkit-box;
					  /* 限制在一个块元素显示的文本的行数 */
					  /* -webkit-line-clamp 其实是一个不规范属性，使用了WebKit的CSS扩展属性，该方法适用于WebKit浏览器及移动端；*/
					  -webkit-line-clamp: 2;
					  /* 设置或检索伸缩盒对象的子元素的排列方式 */
					  -webkit-box-orient: vertical;
				}

				.time {
					position: absolute;
					bottom: -7px;
				}
			}

			image {
				width: 72px;
				height:72px;
				margin-right: 10px;
			}
		}

	}
</style>